import { createRouter, createWebHashHistory } from "vue-router"
import Login from '@/views/Login'
import Training from '@/views/Training'
import Test from '@/views/Test'
import Public from '@/views/Public'
import TestHome from '@/pages/testHome.vue'

import HistoryTest from '@/pages/HistoryTest.vue'
import Punish from '../pages/punish.vue'
import Testing from '../views/Testing.vue'
import Chart from '../pages/Chart.vue'
import Self from '../views/Self.vue'
import Homework from '../views/Homework.vue'
import Trainingclass from '../views/Trainingclass.vue'
import updatePassword  from  "../views/usreManage/updatePassword"
import Paper from "@/views/Paper";
import CompletedExam from "@/views/Exam/completedExam"
import Class from "@/views/Class"
import Searchhomework from '../views/Searchhomework.vue'
import Question from '../views/Question.vue'
import QuestionList from "@/views/QuestionList.vue";
import QuestionManager from "@/views/QuestionManager.vue";
import ObjectList from "@/views/ObjectList.vue";
import ObjectiveQuestion from "@/views/ObjectiveQuestion.vue";
const routes =[
    {
        path:'/login',
        name:'Login',
        component:Login
    },
    {
        path: '/question',
        component: Question
    },
    {
        path:'/training',
        name:'Training',
        component:Training,
        children:[
            {
                path:'class',
                component:Trainingclass,
            },
            {
                path: 'homework',
                component: Homework
            },
            {
                path: 'searchhomework',
                component: Searchhomework
            },
            {
                path: 'questionList',
                component: QuestionList
            },
            {
                path: 'objectList',
                component: ObjectList
            },

            {
                path: 'questionManager',
                component: QuestionManager
            },
            {
                path: 'objectQuestion',
                component: ObjectiveQuestion
            }
        ]
    },
    {
        path:'/test',
        name:'Test',
        component:Test,
        children:[
            {
                path:'home',
                component:TestHome
            },
            // {
            //     path:'user',
            //     component:UserCon
            // },
            {
                path:'updatePassword',
                component:updatePassword
            },
            {
                path:'testing',
                component:HistoryTest
            },
            {
                path:'passtest',
                component:HistoryTest
            },
            {
                path:'testcon',
                component:HistoryTest
            },
            {
                path:'punish',
                component:Punish
            },
            {
                path:'paper',
                component:Paper
            },{
                path:'completedExam',
                component:CompletedExam
            },
            {
                path:'chart',
                name:'chart',
                component:Chart
            },
            {
                path:'class',
                name:'class',
                component:Class
            }
        ]
    },
    {
        path:'/public',
        name:'Public',
        component:Public
    },
    {
        path:'/testing',
        name:'Testing',
        component:Testing
    },
    {
        path:'/self',
        name:'Self',
        component:Self
    },
    {
        path:'/chart',
        component:Chart
    },
    {
        path:'/',
        component:Login
    }

]
export default createRouter({
    history: createWebHashHistory(),
    routes
})
